Separation Logic for Higher-Order Store
نویسندگان
چکیده
Separation Logic is a sub-structural logic that supports local reasoning for imperative programs. It is designed to elegantly describe sharing and aliasing properties of heap structures, thus facilitating the verification of programs with pointers. In past work, separation logic has been developed for heaps containing records of basic data types. Languages like C or ML, however, also permit the use of code pointers. The corresponding heap model is commonly referred to as “higher-order store” since heaps may contain commands which in turn are interpreted as partial functions between heaps. In this paper we make Separation Logic and the benefits of local reasoning available to languages with higher-order store. In particular, we introduce an extension of the logic and prove it sound, including the Frame Rule that enables specifications of code to be extended by invariants on parts of the heap that are not accessed.
منابع مشابه
A Simple Model of Separation Logic for Higher-Order Store
Separation logic is a Hoare-style logic for reasoning about pointer-manipulating programs. Its core ideas have recently been extended from low-level to richer, high-level languages. In this paper we develop a new semantics of the logic for a programming language where code can be stored (i.e., with higher-order store). The main improvement on previous work is the simplicity of the model. As a c...
متن کاملCrowfoot: A Verifier for Higher-Order Store Programs
We present Crowfoot, an automatic verification tool for imperative programs that manipulate procedures dynamically at runtime; these programs use a heap that can store not only data but also code (commands or procedures). Such heaps are often called higher-order store, and allow for instance the creation of new recursions on the fly. One can use higher-order store to model phenomena such as run...
متن کاملNested Hoare Triples and Frame Rules for Higher-Order Store
Separation logic is a Hoare-style logic for reasoning about programs withheap-allocated mutable data structures. As a step toward extending separation logic tohigh-level languages with ML-style general (higher-order) storage, we investigate the com-patibility of nested Hoare triples with several variations of higher-order frame rules.The interaction of nested triples and frame r...
متن کاملSpecification Patterns and Proofs for Recursion through the Store
Higher-order store means that code can be stored on the mutable heap that programs manipulate, and is the basis of flexible software that can be changed or re-configured at runtime. Specifying such programs is challenging because of recursion through the store, where new (mutual) recursions between code are set up on the fly. This paper presents a series of formal specification patterns that ca...
متن کاملKripke Models over Recursively Defined Metric Worlds: Steps and Domains
We show that models of higher-order store phenomenanaturally can be given as Kripke models over worlds thatare recursively defined in a category of metric spaces. Itleads to a unification of methods based on classical do-main theory and on step-indexed operational models. Weshow that our metric approach covers a wide range of step-indexed models, by demonstrating how it ...
متن کامل